export interface IAclState {
  full: boolean;
  roles: string[];
  points: string[];
}
export interface AclType {
  except?: boolean;
  mode?: "oneOf" | "allOf";
  roles?: string[];
  points?: string[];
}
export interface ISettingState {
  prefix: string;
  title: string;
  description: string;
  logo: string;
  keepAlive: boolean;
  cachePageList: string[];
}
export type ThemeColorsType = {
  color: string;
  themeColor: string;
};
export interface ISetting extends IPages, ITheme {
  id: string;
  layout: "vertical" | "mix" | "horizontal";
}
export interface IUser {
  userId: string;
  username: string;
  nickName: string;
}
export interface IOauth2TokenState {
  refresh_token: string;
  access_token: string;
  expires_in: number;
  token_type: string;
}

export interface IUserDetailInfo {
  userId: string;
  superAdmin: boolean;
  username: string;
  nickName: string;
  roles: string[];
  acls: string[];
  menus: IMenu[];
}

export interface IMenu {
  id: string;
  icon: string;
  link: string;
  path: string;
  router: string;
  moda: string;
  title: string;
  keepAlive: boolean;
  frame: string;
  text: string;
  hideInBreadcrumb: boolean;
  forbidden: boolean;
  isLeaf: boolean;
  showExpand: boolean;
  sort: number;
  parentId: string;
  children: IMenu[];
  remark: string;
}
export interface Tags {
  id: string;
  text: string;
  router?: string;
  active: boolean;
  link?: string;
  moda: string;
  frame?: string;
}
export interface IMenuState {
  menu: IMenu[];
  cacheTags: Tags[];
  active: IMenu;
  activeHorizontal: IMenu;
}
export interface ITheme {
  color: string;
  name: string;
  darkMode: boolean;
}
export interface IPages {
  /**灰色模式 */
  grey: boolean;
  /**色弱模式*/
  weak: boolean;
  /**隐藏标签页*/
  hideTabs: boolean;
  /**隐藏页尾*/
  hideFooter: boolean;
  /**侧边栏LOGO*/
  showLogo: boolean;
  /** 标签页风格 */
  showModel: "smart" | "card";
}

export interface ISidebar {
  /** 侧边栏是否打开 */
  opened: boolean;
  /** 侧边栏是否需要动画 */
  withoutAnimation: boolean;
  /** 侧边栏是否点击打开 */
  isClickCollapse: boolean;
}

export interface IAppState {
  hiddenTabs: boolean;
  sidebar: ISidebar;
  fixedHeader: boolean;
  /**当前布局 */
  layout: "vertical" | "mix" | "horizontal";
  /** 当前平台 */
  device: "desktop" | "mobile";
  theme: ITheme;
  pages: IPages;
}
